package org.xt.entity;

import org.nutz.dao.entity.annotation.ColDefine;
import org.nutz.dao.entity.annotation.ColType;
import org.nutz.dao.entity.annotation.Column;
import org.nutz.dao.entity.annotation.Name;
import org.nutz.dao.entity.annotation.Table;

/**
 * 用户
 * @author XiangTao
 *
 */
@Table("tb_user")
public class User extends IdBaseTable{
	@Name
	private String no;
	@Column
	private int departmentId;
	
	@Column
	private String username;
	@ColDefine(type=ColType.VARCHAR, width=64)
	@Column
	private String password;
	@Column
	private String salt;
	@Column
	private int status; //用户状态 0正常 1锁定
	
	public String getNo() {
		return no;
	}
	
	public int getDepartmentId() {
		return departmentId;
	}

	public void setDepartmentId(int departmentId) {
		this.departmentId = departmentId;
	}

	public void setNo(String no) {
		this.no = no;
	}
	public String getUsername() {
		return username;
	}
	public void setUsername(String username) {
		this.username = username;
	}
	public String getPassword() {
		return password;
	}
	public void setPassword(String password) {
		this.password = password;
	}
	public String getSalt() {
		return salt;
	}
	public void setSalt(String salt) {
		this.salt = salt;
	}
	
	public int getStatus() {
		return status;
	}
	public void setStatus(int status) {
		this.status = status;
	}

	@Override
	public String toString() {
		return "User [no=" + no + ", departmentId=" + departmentId + ", username=" + username + ", password=" + password
				+ ", salt=" + salt + ", status=" + status + "]" + super.toString();
	}
}
